package com.wisdudu.blank.data.source.remote.service;

import com.wisdudu.blank.data.bean.CityInfo;
import com.wisdudu.blank.data.bean.PersonalInfo;
import com.wisdudu.blank.data.bean.SystemImg;
import com.wisdudu.blank.data.bean.UserInfo;
import com.wisdudu.blank.data.bean.VersionInfo;
import com.wisdudu.blank.data.source.remote.client.retrofit.subscribers.Abs;
import com.wisdudu.blank.data.source.remote.client.retrofit.subscribers.ListPoint;

import java.util.List;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by qyf on 2016/8/17.
 */

public interface SzAPI {
    String BASE_URL = "http://sz.wisdudu.com/api/";

    @FormUrlEncoded
    @POST("center/Login.html")
    Observable<Abs<UserInfo>> login(@Field("json") String md5MapResult);

    @FormUrlEncoded
    @POST("center/register.html")
    Observable<Abs<UserInfo>> registerUser(@Field("json") String md5MapResult);

    @GET("center/sms/smscode.html")
    Observable<Abs<Object>> getSmsCode(@Query("json") String md5MapResult);

    @FormUrlEncoded
    @PUT("center/register.html")
    Observable<Abs<Object>> editUserNick(@Field("json") String md5MapResult);

    @FormUrlEncoded
    @POST("center/register/resetpwd.html")
    Observable<Abs> resetPwd(@Field("json") String md5MapResult);

    @FormUrlEncoded
    @PUT("Center/Register/userinfo.html")
    Observable<Abs<Object>> editUserInfo(@Field("json") String md5MapResult);

    @GET("center/register/userinfo.html")
    Observable<Abs<PersonalInfo>> getUserInfo(@Query("json") String md5MapResult);

    @GET("center/system.html")
    Observable<Abs<ListPoint<List<SystemImg>>>> getSystemImg(@Query("json") String md5GetResult);

    @GET("center/versions.html")
    Observable<Abs<VersionInfo>> getVersion(@Query("json") String md5GetResult);

    @FormUrlEncoded
    @POST("center/register/editpwds.html")
    Observable<Abs> editPass(@Field("json") String md5GetResult);

    @FormUrlEncoded
    @POST("center/sms/proposal.html")
    Observable<Abs> feedback(@Field("json") String md5GetResult);


    @GET("center/register.html")
    Observable<Abs<ListPoint<List<CityInfo>>>> getCity(@Query("json") String md5GetResult);

    @GET("center/Login.html")
    Observable<Abs<UserInfo>> setVillage(@Query("json") String md5GetResult);



}

